﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_ListAllUsers : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    #region 更新
    /// <summary>
    /// 更新
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ObdsUser_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        MODEL.Users updateUser = (MODEL.Users)e.InputParameters[0];
        updateUser.UId = Convert.ToInt32(((Label)gvUser.Rows[gvUser.EditIndex].FindControl("lbUId")).Text);
        updateUser.Pwd = ((Label)gvUser.Rows[gvUser.EditIndex].FindControl("lbPwd")).Text;
        updateUser.UserRoleId = Convert.ToInt32(((DropDownList)gvUser.Rows[gvUser.EditIndex].FindControl("ddlUserIdentity")).SelectedValue);
        updateUser.UserStateId = Convert.ToInt32(((DropDownList)gvUser.Rows[gvUser.EditIndex].FindControl("ddlUserState")).SelectedValue);
        updateUser.Question = ((Label)gvUser.Rows[gvUser.EditIndex].FindControl("lblQuestion")).Text;
        updateUser.Answer = ((Label)gvUser.Rows[gvUser.EditIndex].FindControl("lblAnswer")).Text;
    } 
    #endregion

}